﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;

namespace DbDiploma.Entities
{
    public class LogEntity
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int LogId { get; set; }

        public virtual UserEntity User { get; set; }

        [Required]
        [EnumDataType(typeof(ActionEnum))]
        public ActionEntity Action { get; set; }

        [Required]
        [DataType(DataType.Url)]
        public string Url { get; set; }

        [Required]
        public int Duration { get; set; }

        [Required]
        public string IP { get; set; }
    }
}
